package com.whminwei.edu.api.school.dto.fspn;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 教师列表
 *
 * @author zhangjq
 * @since 2024-05-30
 */
@Data
@NoArgsConstructor
public class TeacherFspn {

    @JsonValue
    private List<TeacherBo> teacherList;

    @JsonCreator
    public TeacherFspn(List<TeacherBo> teacherList) {
        this.teacherList = teacherList;
    }

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @EqualsAndHashCode(callSuper = true)
    public static class TeacherBo extends StaffFspn.StaffBo {
        /**
         * 所属系部
         */
        private String deptId;

        public TeacherBo(StaffFspn.StaffBo staff, String deptId) {
            super(staff.getStaffId(), staff.getStaffName(), staff.getStaffNo(), staff.getPhone(), staff.getStaffStatus());
            this.deptId = deptId;
        }
    }
}
